package guowei.gulithirdcommon.controller;

import guowei.common.utils.R;
import guowei.gulithirdcommon.utils.SmsSendUtil;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SmsSendController {

    @RequestMapping("/sms/sendMsg")
    public R sendMsg(@RequestParam("phone") String phone, @RequestParam("param") String param){
        String code = param.split("_")[0];
        SmsSendUtil.sendMessage(phone,code);
        return R.ok();
    }

}
